// import IndexView from "@/views/index/index.vue"


const routes = [
    {
        path: "/",
        redirect: "/index"
    },
    {
        path: "/index",
        name: "Index",
        component: () => import("@/views/index/index.vue"), // 路由懒加载
        children: [
            {
                path: "courselist",
                name: "CourseList",
                component: () => import("@/views/index/courselist.vue")
            },
            {
                path: "note",
                name: "Note",
                component: () => import("@/views/index/note.vue")
            },
            {
                path: "exam",
                name: "Exam",
                component: () => import("@/views/index/exam.vue")
            },
            {
                path: "help",
                name: "Help",
                component: () => import("@/views/index/help.vue")
            },
            {
                path: "personal",
                name: "Personal",
                component: () => import("@/views/index/personaldetail.vue")
            }
        ]
    },
    {
        path: "/courseindex",
        name: "CourseIndex",
        component: () => import("@/views/course/courseindex.vue"),
        children: [
            {
                path: "coursecontent",
                name: "Coursecontent",
                component: () => import("@/views/course/coursecontent.vue")
            },
            {
                path: "traintask",
                name: "Traintask",
                component: () => import("@/views/course/traintask.vue")
            },
            {
                path: "taskdetail",
                name: "Taskdetail",
                component: () => import("@/views/course/taskdetail.vue")
            },
            {
                path: "emulation",
                name: "Emulation",
                component: () => import("@/views/course/emulation.vue")
            },
            {
                path: "examindex",
                name: "Examindex",
                component: () => import("@/views/course/examindex.vue")
            },
            {
                path: "learnstatus",
                name: "Learnstatus",
                component: () => import("@/views/course/learnstatus.vue"),
                children: [
                    {
                        path: "learntotal",
                        name: "Learntotal",
                        component: () => import("@/views/course/learntotal.vue")
                    },
                    {
                        path: "totalgrade",
                        name: "Totalgrade",
                        component: () => import("@/views/course/totalgrade.vue")
                    },
                    {
                        path: "learntime",
                        name: "Learntime",
                        component: () => import("@/views/course/learntime.vue")
                    },
                    {
                        path: "taskprogress",
                        name: "Taskprogress",
                        component: () => import("@/views/course/taskprogress.vue")
                    },
                    {
                        path: "learntask",
                        name: "Learntask",
                        component: () => import("@/views/course/learntask.vue")
                    },
                ]
            }
        ]
    },
    {
        path: "/login",
        name: "Login",
        component: () => import("@/views/login/login.vue")
    },

    {
        path: "/examdetail",
        name: "Examdetail",
        component: () => import("@/views/exam/examdetail.vue")
    },
    {
        path: "/coursedocindex",
        name: "Coursedocindex",
        component: () => import("@/views/coursedoc/docindex.vue")
    },
]

export default routes